<template>
  <div id="app">
    <router-view />
    <appDialog ref="dialog"></appDialog>
  </div>
</template>
<script>
import Vue from "vue";
import {
  sellPersonList,
  promotionPersonList,
  shootingTypeList,
  clientTypeList,
  sourceList,
  shootPlaceList,
  initDropDown,
} from "@utils/configuration.js";
import appDialog from "@components/app-dialog.vue";

export default {
  name: "app",

  data() {
    return {};
  },

  components: {
    appDialog,
  },

  mounted() {
    localStorage.setItem("sellPersonList", JSON.stringify(sellPersonList));
    localStorage.setItem(
      "promotionPersonList",
      JSON.stringify(promotionPersonList)
    );
    localStorage.setItem("shootingTypeList", JSON.stringify(shootingTypeList));
    localStorage.setItem("clientTypeList", JSON.stringify(clientTypeList));
    localStorage.setItem("sourceList", JSON.stringify(sourceList));
    localStorage.setItem("shootPlaceList", JSON.stringify(shootPlaceList));
    Vue.prototype.$dataConfig = initDropDown; // 通过 this.$dataConfig 访问配置数据
    Vue.prototype.$dialog = this.$refs.dialog;
  },
};
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
</style>
